<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue.js</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <h1>双向绑定</h1>
        <label>姓名：</label>
        <!-- ref="标记名" -->
        <input ref="name" type="text" @keyup="showName()">
        <span>{{name}}</span>
        <br>
        <label>年龄：</label>
        <!-- 双向绑定属性 -->
        <input type="text" v-model="age">
        <span>{{age}}</span>
    </div>

    <script src="js/ch08.js"></script>
</body>
</html>